import request from '@/utils/request'

const baseURL = '/account'

// 注册账号
export const sign = (account) => request.post(`${baseURL}/saveAccount`, account)

// 获取验证码
export const getVerificationCode = (email) =>
  request.get(`${baseURL}/getVerificationCode`, {
    params: {
      email,
    },
  })

// 校验验证码
export const verifyVerificationCode = (email, code) =>
  request.get(`${baseURL}/verifyVerificationCode`, {
    params: {
      email,
      code,
    },
  })

// 修改密码
export const updatePassword = (account) => request.post(`${baseURL}/updatePassword`, account)

// 登录
export const login = (account) => request.post(`${baseURL}`, account)
